home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / cde.idb / usr / dt / share / include / Dt / ComboBox.h.z / ComboBox.h
Encoding:
C/C++ Source or Header  |  2003-11-18  |  10.8 KB  |  412 lines

  1. /*
  2.  * ComboBox.h
  3.  *
  4.  * Copyright 2000, Silicon Graphics, Inc.
  5.  * ALL RIGHTS RESERVED
  6.  * 
  7.  * UNPUBLISHED -- Rights reserved under the copyright laws of the United
  8.  * States.   Use of a copyright notice is precautionary only and does not
  9.  * imply publication or disclosure.
  10.  *
  11.  * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
  12.  * Use, duplication or disclosure by the Government is subject to restrictions
  13.  * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
  14.  * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
  15.  * in similar or successor clauses in the FAR, or the DOD or NASA FAR
  16.  * Supplement.  Contractor/manufacturer is Silicon Graphics, Inc.,
  17.  * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
  18.  *
  19.  * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
  20.  * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
  21.  * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
  22.  * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
  23.  * GRAPHICS, INC.
  24.  */
  25. /* $XConsortium: ComboBox.h /main/cde1_maint/2 1995/10/05 09:21:03 lehors $ */
  26. /*
  27.  *  (c) Copyright 1993, 1994 Hewlett-Packard Company
  28.  *  (c) Copyright 1993, 1994 International Business Machines Corp.
  29.  *  (c) Copyright 1993, 1994 Novell, Inc.
  30.  *  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
  31.  */
  32. /***********************************************************
  33. Copyright 1993 Interleaf, Inc.
  34.  
  35. Permission to use, copy, modify, and distribute this software
  36. and its documentation for any purpose without fee is granted,
  37. provided that the above copyright notice appear in all copies
  38. and that both copyright notice and this permission notice appear
  39. in supporting documentation, and that the name of Interleaf not
  40. be used in advertising or publicly pertaining to distribution of
  41. the software without specific written prior permission.
  42.  
  43. Interleaf makes no representation about the suitability of this
  44. software for any purpose. It is provided "AS IS" without any
  45. express or implied warranty.
  46. ******************************************************************/
  47.  
  48. #ifndef _Dt_ComboBox_h
  49. #define _Dt_ComboBox_h
  50.  
  51. #include <Xm/Xm.h>
  52.  
  53. #ifdef __cplusplus
  54. extern "C" {
  55. #endif
  56.  
  57.  
  58. /*
  59.  * Constants
  60.  */
  61.  
  62. /* Resources */
  63.  
  64. /***********************************************************************
  65.  *
  66.  * NOTE:
  67.  *    Because of future development of the ComboBox, not all of the 
  68.  *    following resources should be used.  The only ones which are
  69.  *    supported are the ones found in the Common Desktop Environment:
  70.  *    Programmer's Guide.  The supported resources include:
  71.  *    DtNmarginHeight, DtNmarginWidth, DtNselectedItem, 
  72.  *    DtNselectedPosition, DtNselectionCallback, and DtNcomboBoxType.
  73.  *
  74.  *    The use of the unsupported resources found in this header
  75.  *    file may cause dangerous and unexpected behavior.
  76.  *
  77.  **********************************************************************/
  78.  
  79. /* WARNING: DtNactivateCallback is an unsupported resource in CDE 1.0 */
  80. #ifndef DtNactivateCallback
  81. #define DtNactivateCallback    XmNactivateCallback
  82. #endif
  83. /* WARNING: DtNalignment is an unsupported resource in CDE 1.0 */
  84. #ifndef DtNalignment
  85. #define DtNalignment        XmNalignment
  86. #endif
  87. /* WARNING: DtNarrowSize is an unsupported resource in CDE 1.0 */
  88. #ifndef DtNarrowSize
  89. #define DtNarrowSize        "arrowSize"
  90. #endif
  91. /* WARNING: DtNarrowSpacing is an unsupported resource in CDE 1.0 */
  92. #ifndef DtNarrowSpacing
  93. #define DtNarrowSpacing        "arrowSpacing"
  94. #endif
  95. /* WARNING: DtNarrowType is an unsupported resource in CDE 1.0 */
  96. #ifndef DtNarrowType
  97. #define DtNarrowType        "arrowType"
  98. #endif
  99. /* WARNING: DtNcolumns is an unsupported resource in CDE 1.0 */
  100. #ifndef DtNcolumns
  101. #define DtNcolumns        XmNcolumns
  102. #endif
  103. #ifndef DtNcomboBoxType
  104. #define DtNcomboBoxType        "comboBoxType"
  105. #endif
  106. /* WARNING: DtNfocusCallback is an unsupported resource in CDE 1.0 */
  107. #ifndef DtNfocusCallback
  108. #define DtNfocusCallback    XmNfocusCallback
  109. #endif
  110. /* WARNING: DtNhorizontalSpacing is an unsupported resource in CDE 1.0 */
  111. #ifndef DtNhorizontalSpacing
  112. #define DtNhorizontalSpacing    XmNhorizontalSpacing
  113. #endif
  114. /* WARNING: DtNitemCount is an unsupported resource in CDE 1.0 */
  115. #ifndef DtNitemCount
  116. #define DtNitemCount        XmNitemCount
  117. #endif
  118. /* WARNING: DtNitems is an unsupported resource in CDE 1.0 */
  119. #ifndef DtNitems
  120. #define DtNitems        XmNitems
  121. #endif
  122. /* WARNING: DtNlabelString is an unsupported resource in CDE 1.0 */
  123. #ifndef DtNlabelString
  124. #define DtNlabelString        XmNlabelString
  125. #endif
  126. /* WARNING: DtNlist is an unsupported resource in CDE 1.0 */
  127. #ifndef DtNlist
  128. #define DtNlist            "list"
  129. #endif
  130. /* WARNING: DtNlistFontList is an unsupported resource in CDE 1.0 */
  131. #ifndef DtNlistFontList
  132. #define DtNlistFontList        "listFontList"
  133. #endif
  134. /* WARNING: DtNlistMarginHeight is an unsupported resource in CDE 1.0 */
  135. #ifndef DtNlistMarginHeight
  136. #define DtNlistMarginHeight    XmNlistMarginHeight
  137. #endif
  138. /* WARNING: DtNlistMarginWidth is an unsupported resource in CDE 1.0 */
  139. #ifndef DtNlistMarginWidth
  140. #define DtNlistMarginWidth    XmNlistMarginWidth
  141. #endif
  142. /* WARNING: DtNlistSpacing is an unsupported resource in CDE 1.0 */
  143. #ifndef DtNlistSpacing
  144. #define DtNlistSpacing        XmNlistSpacing
  145. #endif
  146. /* WARNING: DtNlosingFocusCallback is an unsupported resource in CDE 1.0 */
  147. #ifndef DtNlosingFocusCallback
  148. #define DtNlosingFocusCallback    XmNlosingFocusCallback
  149. #endif
  150. #ifndef DtNmarginHeight
  151. #define DtNmarginHeight        XmNmarginHeight
  152. #endif
  153. #ifndef DtNmarginWidth
  154. #define DtNmarginWidth        XmNmarginWidth
  155. #endif
  156. /* WARNING: DtNmaxLength is an unsupported resource in CDE 1.0 */
  157. #ifndef DtNmaxLength
  158. #define DtNmaxLength        XmNmaxLength
  159. #endif
  160. /* WARNING: DtNmenuPostCallback is an unsupported resource in CDE 1.0 */
  161. #ifndef DtNmenuPostCallback
  162. #define DtNmenuPostCallback    "menuPostCallback"
  163. #endif
  164. /* WARNING: DtNorientation is an unsupported resource in CDE 1.0 */
  165. #ifndef DtNorientation
  166. #define DtNorientation        XmNorientation
  167. #endif
  168. /* WARNING: DtNpoppedUp is an unsupported resource in CDE 1.0 */
  169. #ifndef DtNpoppedUp
  170. #define DtNpoppedUp        "poppedUp"
  171. #endif
  172. /* WARNING: DtNrecomputeSize is an unsupported resource in CDE 1.0 */
  173. #ifndef DtNrecomputeSize
  174. #define DtNrecomputeSize    XmNrecomputeSize
  175. #endif
  176. #ifndef DtNselectedItem
  177. #define DtNselectedItem        "selectedItem"
  178. #endif
  179. #ifndef DtNselectedPosition
  180. #define DtNselectedPosition    "selectedPosition"
  181. #endif
  182. #ifndef DtNselectionCallback
  183. #define DtNselectionCallback    "selectionCallback"
  184. #endif
  185. /* WARNING: DtNtextField is an unsupported resource in CDE 1.0 */
  186. #ifndef DtNtextField
  187. #define DtNtextField        "textField"
  188. #endif
  189. /* WARNING: DtNtopItemPosition is an unsupported resource in CDE 1.0 */
  190. #ifndef DtNtopItemPosition
  191. #define DtNtopItemPosition    XmNtopItemPosition
  192. #endif
  193. /* WARNING: DtNupdateLabel is an unsupported resource in CDE 1.0 */
  194. #ifndef DtNupdateLabel
  195. #define DtNupdateLabel        "updateLabel"
  196. #endif
  197. /* WARNING: DtNverticalSpacing is an unsupported resource in CDE 1.0 */
  198. #ifndef DtNverticalSpacing
  199. #define DtNverticalSpacing    XmNverticalSpacing
  200. #endif
  201. /* WARNING: DtNvisibleItemCount is an unsupported resource in CDE 1.0 */
  202. #ifndef DtNvisibleItemCount
  203. #define DtNvisibleItemCount    XmNvisibleItemCount
  204. #endif
  205.  
  206. #ifndef DtCAlignment
  207. #define DtCAlignment        XmCAlignment
  208. #endif
  209. #ifndef DtCArrowSize
  210. #define DtCArrowSize        "ArrowSize"
  211. #endif
  212. #ifndef DtCArrowSpacing
  213. #define DtCArrowSpacing        "ArrowSpacing"
  214. #endif
  215. #ifndef DtCArrowType
  216. #define DtCArrowType        "ArrowType"
  217. #endif
  218. #ifndef DtCCallback
  219. #define DtCCallback        XmCCallback
  220. #endif
  221. #ifndef DtCColumns
  222. #define DtCColumns        XmCColumns
  223. #endif
  224. #ifndef DtCComboBoxType
  225. #define DtCComboBoxType        "ComboBoxType"
  226. #endif
  227. #ifndef DtCHorizontalSpacing
  228. #define DtCHorizontalSpacing    "HorizontalSpacing"
  229. #endif
  230. #ifndef DtCItemCount
  231. #define DtCItemCount        XmCItemCount
  232. #endif
  233. #ifndef DtCItems
  234. #define DtCItems        XmCItems
  235. #endif
  236. #ifndef DtCList
  237. #define DtCList            "List"
  238. #endif
  239. #ifndef DtCListFontList
  240. #define DtCListFontList        "ListFontList"
  241. #endif
  242. #ifndef DtCListMarginHeight
  243. #define DtCListMarginHeight    XmCListMarginHeight
  244. #endif
  245. #ifndef DtCListMarginWidth
  246. #define DtCListMarginWidth    XmCListMarginWidth
  247. #endif
  248. #ifndef DtCListSpacing
  249. #define DtCListSpacing        XmCListSpacing
  250. #endif
  251. #ifndef DtCMarginHeight
  252. #define DtCMarginHeight        XmCMarginHeight
  253. #endif
  254. #ifndef DtCMarginWidth
  255. #define DtCMarginWidth        XmCMarginWidth
  256. #endif
  257. #ifndef DtCMaxLength
  258. #define DtCMaxLength        XmCMaxLength
  259. #endif
  260. #ifndef DtCOrientation
  261. #define DtCOrientation        XmCOrientation
  262. #endif
  263. #ifndef DtCPoppedUp
  264. #define DtCPoppedUp        "PoppedUp"
  265. #endif
  266. #ifndef DtCRecomputeSize
  267. #define DtCRecomputeSize    XmCRecomputeSize
  268. #endif
  269. #ifndef DtCSelectedItem
  270. #define DtCSelectedItem        "SelectedItem"
  271. #endif
  272. #ifndef DtCSelectedPosition
  273. #define DtCSelectedPosition    "SelectedPosition"
  274. #endif
  275. #ifndef DtCTextField
  276. #define DtCTextField        "TextField"
  277. #endif
  278. #ifndef DtCTopItemPosition
  279. #define DtCTopItemPosition    XmCTopItemPosition
  280. #endif
  281. #ifndef DtCUpdateLabel
  282. #define DtCUpdateLabel        "UpdateLabel"
  283. #endif
  284. #ifndef DtCVerticalSpacing
  285. #define DtCVerticalSpacing    "VerticalSpacing"
  286. #endif
  287. #ifndef DtCVisibleItemCount
  288. #define DtCVisibleItemCount    XmCVisibleItemCount
  289. #endif
  290. #ifndef DtCXmString
  291. #define DtCXmString        XmCXmString
  292. #endif
  293.  
  294. /* Representation types */
  295.  
  296. #ifndef DtRArrowType
  297. #define DtRArrowType        "ArrowType"
  298. #endif
  299. #ifndef DtRComboBoxType
  300. #define DtRComboBoxType        "ComboBoxType"
  301. #endif
  302.  
  303. /* DtNorientation values */
  304.  
  305. #ifndef DtLEFT
  306. #define DtLEFT        1
  307. #endif
  308. #ifndef DtRIGHT
  309. #define DtRIGHT        2
  310. #endif
  311.  
  312. /* DtNarrowType values */
  313.  
  314. #ifndef DtMOTIF
  315. #define DtMOTIF        0
  316. #endif
  317. #ifndef DtWINDOWS
  318. #define DtWINDOWS    1
  319. #endif
  320.  
  321. /* DtNcomboBoxType values */
  322.  
  323. #ifndef DtDROP_DOWN_LIST
  324. #define DtDROP_DOWN_LIST    2
  325. #endif
  326. #ifndef DtDROP_DOWN_COMBO_BOX
  327. #define DtDROP_DOWN_COMBO_BOX    1
  328. #endif
  329.  
  330. /* DtNalignment values */
  331.  
  332. #ifndef DtALIGNMENT_BEGINNING
  333. #define DtALIGNMENT_BEGINNING    XmALIGNMENT_BEGINNING
  334. #endif
  335. #ifndef DtALIGNMENT_CENTER
  336. #define DtALIGNMENT_CENTER    XmALIGNMENT_CENTER
  337. #endif
  338. #ifndef DtALIGNMENT_END
  339. #define DtALIGNMENT_END        XmALIGNMENT_END
  340. #endif
  341.  
  342. /* Callback reasons */
  343.  
  344. #ifndef DtCR_SELECT
  345. #define DtCR_SELECT        57 /* Large #, so no collisions with XM */
  346. #endif
  347. #ifndef DtCR_MENU_POST
  348. #define DtCR_MENU_POST      129 /* Large #, so no collisions with XM */
  349. #endif
  350.  
  351.  
  352. /*
  353.  * Types
  354.  */
  355.  
  356. typedef struct {
  357.     int        reason;
  358.     XEvent        *event;
  359.     XmString    item_or_text;
  360.     int        item_position;
  361. } DtComboBoxCallbackStruct;
  362.  
  363.  
  364. /* Widget class and instance */
  365.  
  366. typedef struct _DtComboBoxClassRec *DtComboBoxWidgetClass;
  367. typedef struct _DtComboBoxRec      *DtComboBoxWidget;
  368.  
  369.  
  370. /*
  371.  * Data
  372.  */
  373.  
  374. /* Widget class record */
  375.  
  376. externalref WidgetClass dtComboBoxWidgetClass;
  377.  
  378.  
  379. /*
  380.  * Functions
  381.  */
  382.  
  383. extern Widget DtCreateComboBox(
  384.         Widget        parent,
  385.         char        *name,
  386.         ArgList        arglist,
  387.         Cardinal    argcount);
  388.  
  389. extern void DtComboBoxAddItem(
  390.         Widget         combo,
  391.         XmString    item,
  392.         int        pos,
  393.         Boolean        unique);
  394.  
  395. extern void DtComboBoxDeletePos(
  396.         Widget        combo,
  397.         int        pos);
  398.  
  399. extern void DtComboBoxSetItem(
  400.         Widget        combo,
  401.         XmString    item);
  402.  
  403. extern void DtComboBoxSelectItem(
  404.         Widget        combo,
  405.         XmString    item);
  406.  
  407. #ifdef __cplusplus
  408. }
  409. #endif
  410.  
  411. #endif    /* _Dt_ComboBox_h */
  412.